package org.example.erp.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import org.example.erp.domain.RepairOrders;
import org.example.erp.service.impl.RepairOrdersServiceImpl;
import org.example.erp.service.impl.SnTableServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api")
public class RepairOrdersController {
    @Autowired
    private RepairOrdersServiceImpl repairOrdersService;
    @GetMapping("/repairOrders/find")
    public DataResult findSalesOutbound(@RequestParam(value = "currentPage",defaultValue = "1") Integer currentPage,
                                        @RequestParam(value = "pageSize",defaultValue = "1") Integer pageSize,
                                        @RequestParam(required = false) String repairNo,
                                        @RequestParam(required = false) String repairName,
                                        @RequestParam(required = false) String repairResults,
                                        @RequestParam(required = false) String documentStatus,
                                         @RequestParam(required = false) String deviceNo,
                                         @RequestParam(required = false) String deviceName){
        IPage<RepairOrders> findwx = repairOrdersService.findwx(currentPage, pageSize, repairNo, repairName, repairResults, documentStatus, deviceNo, deviceName);
        return DataResult.success(findwx);
    }

}
